<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('index')}">买家列表</a></li>
        <li class="active"><a href="{:url('add')}">添加买家</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('add')}">
        <div class="form-group">
            <label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>客户名称</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control" id="input-name" required name="name">
                <p class="help-block">（客户名称最大8位）</p>
            </div>
        </div>
        <div class="form-group">
            <label for="input-cid" class="col-sm-2 control-label"><span class="form-required">*</span>行业类别</label>
            <div class="col-md-6 col-sm-10">
                <select name="cid" class="form-control" id="input-cid">
                    <volist name="cate" id="vo">
                        <option value="{$vo.id}">{$vo.name}</option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="input-phone" class="col-sm-2 control-label"><span class="form-required">*</span>联系电话</label>
            <div class="col-md-6 col-sm-10">
                <input type="tel" class="form-control" id="input-phone" required name="phone">
            </div>
        </div>
        <div class="form-group">
            <label for="input-source" class="col-sm-2 control-label"><span class="form-required">*</span>客户来源</label>
            <div class="col-md-6 col-sm-10">
                <input class="form-control" type="text" style="width:400px;" required value=""
                       placeholder="请选择客户来源" onclick="doSelectLayer(this);"
                       data-url="{:url('rongcui/customer_nature/select',['type'=>2])}" data-id="input-source" name="layer_temp[2]"
                       readonly/>
                <input class="form-control" type="hidden" value="" name="source"
                       id="input-source"/>
            </div>
        </div>
        <div class="form-group">
            <label for="input-customer_level" class="col-sm-2 control-label"><span class="form-required">*</span>客户级别</label>
            <div class="col-md-6 col-sm-10">
                <input class="form-control" type="text" style="width:400px;" required value=""
                       placeholder="请选择客户级别" onclick="doSelectLayer(this);"
                       data-url="{:url('rongcui/customer_nature/select',['type'=>3])}" data-id="input-customer_level" name="layer_temp[3]"
                       readonly/>
                <input class="form-control" type="hidden" value="" name="customer_level"
                       id="input-customer_level"/>
            </div>
        </div>
        <div class="form-group">
            <label for="input-nature" class="col-sm-2 control-label">客户类型</label>
            <div class="col-md-6 col-sm-10">
                <input class="form-control" type="text" style="width:400px;" value=""
                       placeholder="请选择客户类型" onclick="doSelectLayer(this);"
                       data-url="{:url('rongcui/customer_nature/select',['type'=>8])}" data-id="input-nature" name="layer_temp[4]"
                       readonly/>
                <input class="form-control" type="hidden" value="" name="nature"
                       id="input-nature"/>
            </div>
        </div>
        <div class="form-group">
            <label for="select-area" class="col-sm-2 control-label"><span class="form-required">*</span>需求区域</label>
            <div class="col-md-6 col-sm-10">
                <select class="form-control" id="select-area" name="area" required>
                    <option>全国</option>
                    <volist name="areaslist" id="vo">
                        <option value="{$vo.areaid}">{$vo.name}</option>
                    </volist>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="input-createtime" class="col-sm-2 control-label">录入时间</label>
            <div class="col-md-6 col-sm-10">
                <input type="text" class="form-control js-bootstrap-datetime" id="input-createtime" data-max-date="{:date('Y-m-d H:i')}" value="{:date('Y-m-d H:i')}" required name="createtime">
            </div>
        </div>
        <div class="form-group">
            <label for="input-price" class="col-sm-2 control-label"><span class="form-required">*</span>报价</label>
            <div class="col-md-6 col-sm-10" style="width:400px;padding: 0 15px;">
                <div class="input-group">
                    <span class="input-group-addon">¥</span>
                    <input type="number" class="form-control" id="input-price" name="price" required>
                    <span class="input-group-addon">万元</span>
                </div>
                <p class="help-block">（两位小数）</p>
            </div>
        </div>
        <div class="form-group">
            <label for="input-budget" class="col-sm-2 control-label">客户预算</label>
            <div class="col-md-6 col-sm-10" style="width:400px;padding: 0 15px;">
                <div class="input-group">
                    <span class="input-group-addon">¥</span>
                    <input type="number" class="form-control" id="input-budget" name="budget">
                    <span class="input-group-addon">万元</span>
                </div>
                <p class="help-block">（两位小数）</p>
            </div>
        </div>
        <div class="form-group">
            <label for="textarea-remark" class="col-sm-2 control-label">备注</label>
            <div class="col-md-6 col-sm-10">
                <textarea name="remark" class="form-control" id="textarea-remark" rows="3"></textarea>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
                <a class="btn btn-default" href="{:url('index')}">返回</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>